Conditions | 1 |
Paths | 24 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 3 |
1 | const inquirer = require('inquirer'); |
||
13 | constructor() { |
||
14 | this.questions = []; |
||
15 | this.validate = { |
||
16 | notEmpty(value) { |
||
17 | return (value && value.length && value.length > 0) ? |
||
18 | true : 'Please enter a value'; |
||
19 | }, |
||
20 | yesNo(value) { |
||
21 | return (value && |
||
22 | ['y', 'n', 'yes', 'no'].indexOf(value.toLowerCase()) !== -1) ? |
||
23 | true : 'Invalid input to yes/no question'; |
||
24 | } |
||
25 | }; |
||
26 | } |
||
27 | |||
66 |